<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<!DOCTYPE html>
<html>
 <head>
  <title>留言管理</title>
  <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  <script type="text/javascript">
  </script>
 </head>
 <body>
  <t:formvalid formid="formobj" dialog="true" beforeSubmit="validateContent" layout="table" 
               action="messageBoardController.do?doAdd" tiptype="3" callback="@OverrideafterBack" > 
		<table style=" " cellpadding="0" cellspacing="1" class="formtable">
				<tr>
					<td align="right" style="    width: 100px;    text-align: center;">
						<label class="Validform_label">
							留言内容:<br>
							(最多500字)
						</label>
					</td>
					<td class="value" style=" padding-bottom: 0;    padding-left: 0;padding-top: 0;">
					    <textarea  id='content' 
					    		   name="content" 
					    		   maxlength=500 style="width:99%;height:220px;border:none;padding:3px;padding-top:8px;"></textarea>
						 
					</td> 
				</tr> 
		</table>
  </t:formvalid>
  <style>
  	textarea:focus{
  		outline:none;
  	}
  </style>
  <script>
  
  	function afterBack(){
  		alert("提交成功");
  		frameElement.api.close();
  	}
  
  	$(document).ready(function(){
  		$('#content').focus();
  	});
  
  	function validateContent(){
  		var content = $('#content').val().trim();
  		if(content==''){
  			tip("请输入留言内容");
  			return false;
  		}
  		return true;
  	}
  </script>
 </body> 